package me.chan.entity;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by JanGin on 2017/6/21.
 */
public class View {

    private String viewPath;

    private Map<String, Object> model;

    public View(String viewPath) {
        this.viewPath = viewPath;
        model = new HashMap<>();
    }

    public View addModel(String key, Object value) {
        model.put(key, value);
        return this;
    }

    public String getViewPath() {
        return viewPath;
    }

    public Map<String, Object> getModel() {
        return model;
    }
}
